﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Go;

namespace WpfTest
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        shared_strand strand;
        public MainWindow()
        {
            InitializeComponent();
            strand = new shared_strand();
            generator.go(strand, async delegate ()
            {
                while (true)
                {
                    await generator.send_dispatcher(this.Dispatcher, () => TextBox_A.Text = DateTime.Now.ToString());
                    await generator.sleep(100);
                }
            });
        }
    }
}
